///
///  photo_view_demo.dart
///  create by zmtzawqlp on 2019/4/4
import 'package:flutter/material.dart' hide CircularProgressIndicator;
import 'package:flutter_ui_demo/page/others/hero_image/hero_image_grid_widget.dart';

class PhotoViewDemo extends StatefulWidget {
  @override
  _PhotoViewDemoState createState() => _PhotoViewDemoState();
}

class _PhotoViewDemoState extends State<PhotoViewDemo> {
  List<String> images1 = <String>[
    'https://photo.tuchong.com/14649482/f/601672690.jpg',
    'https://photo.tuchong.com/17325605/f/641585173.jpg',
    'https://photo.tuchong.com/3541468/f/256561232.jpg',
    'https://photo.tuchong.com/16709139/f/278778447.jpg',
    'https://photo.tuchong.com/15195571/f/233361383.jpg',
    'https://photo.tuchong.com/5040418/f/43305517.jpg',
    // 'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1606479505143&di=83a2988c1a8a2c81427c052db24cec50&imgtype=0&src=http%3A%2F%2Fwx1.sinaimg.cn%2Fmw690%2Fa716fd45ly1gfkifr84h8j20rs3d77m3.jpg',
    'https://photo.tuchong.com/3019649/f/302699092.jpg',
  ];
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('SlidePage'),
      ),
      body: Padding(
        padding: const EdgeInsets.all(10.0),
        child: SingleChildScrollView(
          child: Column(
            children: [
              HeroImageGridWidget(
                urlImages: images1,
                onPageChanged: (value) => print(value),
              ),
            ],
          ),
        ),
      ),
    );
  }
}
